<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-3.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(":button:first").click(function(){
		if($(":text:first").val()==""){
			alert("请输入菜单名称");
		}else if($(":text:eq(1)").val()==""){
			alert("请输入菜单地址");
		}else{
			$("form").submit();
		}
	});
});
</script>
</head>
<body>
<form action="${empty param.id?'AddMenuServlet':'UpdateMenuServlet'}">
菜单名称：<input type="text" value="${param.name }" name="name"><br>
菜单地址：<input type="text" value="${param.url }" name="url"><br>
<input type="hidden" name="id" value="${param.id}">
<input type="button" value="${empty param.id?'添加':'修改'}">
</form>
</body>
</html>